﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace Zhinengbiao
{
    [Designer(typeof(TongJi_EMS._TJ_Basic.TJ_BasicControlDesigner))]
    public partial class zhinengbiao : TongJi_EMS._TJ_Basic.TJ_BasicControl//智能表
    {

        private float x, y;
        private string bol = "0";

        public string Bol
        {
            get { return bol; }
            set { bol = value; }
        }

        public zhinengbiao()
        {
            InitializeComponent();
            this.NeedPoint = true;
        }

        private void zhinengbiao_Load_1(object sender, EventArgs e)
        {
            zhinengbiao_Resize(sender, e);
        }

        private void zhinengbiao_Paint(object sender, PaintEventArgs e)
        {
        //    //znb_Alarm = true;
        //    if (bol == "0")
        //    {
        //        e.Graphics.FillRectangle(Brushes.Red, 0, 0, x * 2f, y * 0.8f);
        //    }
        //    else
        //    {
        //        e.Graphics.FillRectangle(Brushes.Green, 0, 0, x * 2f, y * 0.8f);
        //    }
        //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, y * 0.8f, x * 0.1f, y * 1.2f);
        //    e.Graphics.FillRectangle(Brushes.DarkBlue, x * 1.9f, y * 0.8f, x * 0.1f, y * 1.2f);
        //    e.Graphics.FillRectangle(Brushes.DarkBlue, 0, y * 1.9f, x * 2f, y * 0.1f);
        //    e.Graphics.FillEllipse(Brushes.White, x * 1.35f, y * 1.2f, x * 0.3f, y * 0.3f);
        //    e.Graphics.FillEllipse(Brushes.White, x * 0.35f, y * 1.2f, x * 0.3f, y * 0.3f);
        }

        private void zhinengbiao_Resize(object sender, EventArgs e)
        {
            this.x = this.Width / 2;
            this.y = this.Height / 2;
            Refresh();
        }


    }
}